package se.liu.oschi129.world.objects;

import se.liu.oschi129.animation.set.CharacterSet;

/**
 * This class extends WorldMovableObjects. The extension gives us the ability to link a BufferedCharacterSet to the object.
 * 
 * @author oschi129
 */
public abstract class WorldMovableCharacterObject extends WorldMovableObject {

	// This is the animation set
	private CharacterSet animationSet;
	
	/**
	 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	 * - - - - - - - - - - - - Constructors - - - - - - - - - - - 
	 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	 */
	
	public WorldMovableCharacterObject(double x, double y, double width, double height) {
		super(x, y, width, height);
	}
	
	public WorldMovableCharacterObject(CharacterSet animationSet, boolean visible, double x, double y, double width, double height) {
		this(x, y, width, height);
		this.animationSet = animationSet;
		setVisible(visible);
	}
	
	public WorldMovableCharacterObject(Type type, CharacterSet animationSet, boolean visible, double x, double y, double width, double height) {
		this(animationSet, visible, x, y, width, height);
		setType(type);
	}
	
	/**
	 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	 * - - - - - - - - - - Public methods - - - - - - - - - - - 
	 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	 */
	
	/** Link a new BufferedCharacterSet to the object */
	public void setAnimationSet(CharacterSet animationSet) {
		this.animationSet = animationSet;
	}
	
	/** Returns the currently used BufferedCharacterSet */
	public CharacterSet getAnimationSet() {
		return animationSet;
	}
	
}
